import { Behaviour } from "../engine/Behaviour";
import { BitmapRenderer } from "../engine/BitmapRenderer";
import { string } from "../engine/validators/string";

export class DialogBinding extends Behaviour {

    imageSource: string=""

    @string()
    source1 = ""
    @string()
    source2 = ""


    onStart() {
        this.imageSource = this.gameObject.children[0].getBehaviour(BitmapRenderer).source;
        this.gameObject.onClick = () => {
    
        }
    }

    onTick(duringTime: number){
        this.gameObject.children[0].getBehaviour(BitmapRenderer).source=this.imageSource
    }
}